#ifndef THREADRUNNER_H
#define THREADRUNNER_H

#include <QThread>
#include <QObject>
#include <iostream>
#include <QProcess>
#include <QStringList>
#include <QDateTime>
#include <QPair>
#include <QMap>


class ThreadRunner:public QThread
{
    Q_OBJECT
public:
    ThreadRunner();


    void run() override;


    void AddProcess(int row,QString appPath,bool detach,QStringList paramsList,bool allow = true);

    void clear();
signals:
    void TaskFinished(int row,QString r2,QString r3);

private:
    QMap<int,QPair<QString,QStringList>>  prss;
    QMap<int,bool>  prsDetach;
};

#endif // THREADRUNNER_H
